package com.powersystem.demo.controller;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.powersystem.demo.entity.PsSolvetaskMain;
import com.powersystem.demo.mapper.PsSolvetaskMainMapper;
import com.powersystem.demo.service.IPsSolvetaskMainService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author linrongji
 * @since 2019-11-14
 */
@RestController
public class PsSolvetaskMainController {
    @Autowired
    private IPsSolvetaskMainService ipscs;

    //插入一條記錄
    @RequestMapping("addPsSolvetaskMain")
    public boolean addPsSolvetaskMain(PsSolvetaskMain psc){
        return ipscs.save(psc);
    }

    // 根據ID修改是否啓動
    @RequestMapping("upPsSolvetaskMain")
    public boolean upPsSolvetaskMain(PsSolvetaskMain psc){
        return ipscs.updateById(psc);
    }

    // 根據ID刪除
    @RequestMapping("delePsSolvetaskMain")
    public boolean delePsSolvetaskMain(int id){
        return ipscs.removeById(id);
    }

    // 分頁查詢
    @RequestMapping("listPsSolvetaskMain")
    public IPage<PsSolvetaskMain> listSystemconfig(int lineId,int isStart,int page){
        return ipscs.selectPageVo(lineId,isStart,page);
    }
}

